package com.zly.distributed.lock.controller;

import com.zly.distributed.lock.service.StockService;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class StockController {
    @Resource
    private StockService stockService;
    @GetMapping("/stock/deduct")
    public  String deduct(){
        stockService.deduct();
        return "Stock is deduct";
    }

}
